# coding: utf-8

"""
    Firefly III API Client

    This is the Python client for Firefly III API  # noqa: E501

    The version of the OpenAPI document: 0.10.0
    Contact: thegrumpydictator@gmail.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class AvailableBudgetUpdate(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'amount': 'float',
        'currency_code': 'str',
        'currency_id': 'int',
        'end': 'date',
        'start': 'date'
    }

    attribute_map = {
        'amount': 'amount',
        'currency_code': 'currency_code',
        'currency_id': 'currency_id',
        'end': 'end',
        'start': 'start'
    }

    def __init__(self, amount=None, currency_code=None, currency_id=None, end=None, start=None):  # noqa: E501
        """AvailableBudgetUpdate - a model defined in OpenAPI"""  # noqa: E501

        self._amount = None
        self._currency_code = None
        self._currency_id = None
        self._end = None
        self._start = None
        self.discriminator = None

        self.amount = amount
        if currency_code is not None:
            self.currency_code = currency_code
        if currency_id is not None:
            self.currency_id = currency_id
        self.end = end
        self.start = start

    @property
    def amount(self):
        """Gets the amount of this AvailableBudgetUpdate.  # noqa: E501


        :return: The amount of this AvailableBudgetUpdate.  # noqa: E501
        :rtype: float
        """
        return self._amount

    @amount.setter
    def amount(self, amount):
        """Sets the amount of this AvailableBudgetUpdate.


        :param amount: The amount of this AvailableBudgetUpdate.  # noqa: E501
        :type: float
        """
        if amount is None:
            raise ValueError("Invalid value for `amount`, must not be `None`")  # noqa: E501

        self._amount = amount

    @property
    def currency_code(self):
        """Gets the currency_code of this AvailableBudgetUpdate.  # noqa: E501

        Use either currency_id or currency_code.  # noqa: E501

        :return: The currency_code of this AvailableBudgetUpdate.  # noqa: E501
        :rtype: str
        """
        return self._currency_code

    @currency_code.setter
    def currency_code(self, currency_code):
        """Sets the currency_code of this AvailableBudgetUpdate.

        Use either currency_id or currency_code.  # noqa: E501

        :param currency_code: The currency_code of this AvailableBudgetUpdate.  # noqa: E501
        :type: str
        """

        self._currency_code = currency_code

    @property
    def currency_id(self):
        """Gets the currency_id of this AvailableBudgetUpdate.  # noqa: E501

        Use either currency_id or currency_code.  # noqa: E501

        :return: The currency_id of this AvailableBudgetUpdate.  # noqa: E501
        :rtype: int
        """
        return self._currency_id

    @currency_id.setter
    def currency_id(self, currency_id):
        """Sets the currency_id of this AvailableBudgetUpdate.

        Use either currency_id or currency_code.  # noqa: E501

        :param currency_id: The currency_id of this AvailableBudgetUpdate.  # noqa: E501
        :type: int
        """

        self._currency_id = currency_id

    @property
    def end(self):
        """Gets the end of this AvailableBudgetUpdate.  # noqa: E501

        End date of the available budget.  # noqa: E501

        :return: The end of this AvailableBudgetUpdate.  # noqa: E501
        :rtype: date
        """
        return self._end

    @end.setter
    def end(self, end):
        """Sets the end of this AvailableBudgetUpdate.

        End date of the available budget.  # noqa: E501

        :param end: The end of this AvailableBudgetUpdate.  # noqa: E501
        :type: date
        """
        if end is None:
            raise ValueError("Invalid value for `end`, must not be `None`")  # noqa: E501

        self._end = end

    @property
    def start(self):
        """Gets the start of this AvailableBudgetUpdate.  # noqa: E501

        Start date of the available budget.  # noqa: E501

        :return: The start of this AvailableBudgetUpdate.  # noqa: E501
        :rtype: date
        """
        return self._start

    @start.setter
    def start(self, start):
        """Sets the start of this AvailableBudgetUpdate.

        Start date of the available budget.  # noqa: E501

        :param start: The start of this AvailableBudgetUpdate.  # noqa: E501
        :type: date
        """
        if start is None:
            raise ValueError("Invalid value for `start`, must not be `None`")  # noqa: E501

        self._start = start

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, AvailableBudgetUpdate):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
